﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity;
using KvoMvc.BusinessEntity;

namespace KvoMvc.DataAccess
{
    public class SchoolContext : DbContext
    {
        public SchoolContext()
        {
            //Database.SetInitializer <SchoolContext>(new RecreateDatabaseIfModelChanges<SchoolContext>());
            Database.SetInitializer<SchoolContext>(null);
        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);
            //modelBuilder.Conventions.Remove<IncludeMetadataConvention>();
        }

        public DbSet<Department> Department { get; set; }
        public DbSet<Person> Person { get; set; }
    }
}
